const conn = require('../app/databse')
class AuthService {
  async findByName(name) {
    const statment = 'SELECT name,password from `user` WHERE name = ?'
    const result = await conn.execute(statment, [name])
    return result[0]
  }
}
module.exports = new AuthService